package com.cskaoyan.utils;


import com.cskaoyan.mapper.CskaoyanmallUserMapper;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;


import java.util.List;

public class QueryUserIdByUserNameUtils {

//    @Autowired
//    CskaoyanmallUserMapper userMapper;

    public static Integer queryName(CskaoyanmallUserMapper mapper){

        Subject subject = SecurityUtils.getSubject();
        String name = (String) subject.getPrincipal();
        System.out.println(name);
        Integer id = mapper.seleceIdByUsername(name);

        return id;
    }
}
